package com.meida.module.bus.client.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.NoArgsConstructor;

/**
 * 订单售后
 *
 * @author gp
 * @date 2021/8/9
 */
@NoArgsConstructor
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ApiModel("订单售后")
public enum OrderAfterServiceEnum {
    /**
     * 订单售后(1:待审核，2:审核成功，3:审核失败)
     */
    waitCheck(0, "待审核", "待审核", "待审核"),
    checkPass(1, "审核成功", "退款成功", "退款成功,资金已成功退回您的账户余额"),
    checkFail(2, "审核失败", "退款失败", "退款失败,您的申请不符合平台的退款条件!如有问题可详情咨询客服");

    @EnumValue
    private Integer value;
    private String label;
    private String label1;
    private String label2;

    OrderAfterServiceEnum(Integer value, String label, String label1, String label2) {
        this.value = value;
        this.label = label;
        this.label1 = label1;
        this.label2 = label2;
    }


    public void setValue(Integer value) {
        this.value = value;
    }

    public String getLabel() {
        return label;
    }

    public Integer getValue() {
        return value;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static OrderAfterServiceEnum getByValue(Integer value) {
        for (OrderAfterServiceEnum orderAfterServiceEnum : values()) {
            if (orderAfterServiceEnum.getValue().equals(value)) {
                return orderAfterServiceEnum;
            }
        }
        return null;
    }
}
